package ui.panel
{
	import flash.display.Sprite;
	import flash.geom.Rectangle;

	import globals.Global;

	import ui.component.ScaleBitmap;

	import util.DisplayUtil;

	public class GuideDialog extends Sprite
	{
		private var bgMask:BackgroundMask;

		public function GuideDialog()
		{
			super();
			initUI();
		}

		private function initUI():void
		{
			/*bgMask = new BackgroundMask();
			 this.addChild(bgMask);*/
			var bg:ScaleBitmap = new ScaleBitmap(Global.assetsManager.getAssetsAsBitmapData("new_guide_bg"));
			bg.scale9Grid = new Rectangle(16, 16, 10, 10);
			bg.width = 400;
			bg.height = 130;
			this.addChild(bg);
		}

		public function open(x:Number = 0, y:Number = 0):void
		{
			this.x = x;
			this.y = y;
			Global.game.panelLayer.addChild(this);
		}

		public function close():void
		{
			DisplayUtil.removeChild(this.parent, this);
		}
	}
}
import flash.display.Shape;
import globals.Setting;

/**蒙板**/
class BackgroundMask extends Shape
{
	public function BackgroundMask()
	{
		with(this.graphics)
		{
			beginFill(0x000000, 0.3);
			drawRect(0, 0, Setting.STAGE_WIDTH, Setting.STAGE_HEIGHT);
			endFill();
		}
	}
}